package com.se.mapper;

import com.se.domain.dto.QuestionDTO;
import com.se.domain.mysql.QuestionDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuestionMapper {

    void insertAllDTO(@Param("list") List<QuestionDTO> questionDTOList);

    @Select("select * from question where qn_id = #{qnId} and active = true")
    List<QuestionDO> listByQnId(@Param("qnId") Long qnId);

    @Select("select * from question where q_id = #{qId} and active = true")
    QuestionDO getByQId(@Param("qId") Long qId);
}
